home *** CD-ROM | disk | FTP | other *** search
/ Clickx 75 / Clickx 75.iso / software / expressionweb / expressionwebv3 / ExpressionWeb_en.exe / Setup / WeConen.cab / xweb.ACTIONS.INSERTPR.HTM.en < prev    next >
Encoding:
Text File  |  2009-06-09  |  8.0 KB  |  309 lines

  1. 
  2. <html>
  3.     <head>
  4.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5.         <title></title>
  6.         <meta http-equiv="msthemecompatible" content="yes">
  7.         <meta name="DialogResizable" content="true">
  8.         <meta name="DialogSize" content="350,125">
  9.         
  10.         <style> 
  11.             button    { width: 8em; }                
  12.             table    { border: none; border-collapse: collapse }
  13.         </style>
  14.         <script src="FPLib.js" type="text/JavaScript"></script>
  15.         <script src="Strings.js" type="text/JavaScript"></script>
  16.         <script type="text/JavaScript">
  17.             var L_strInsert_DialogTitle        = "Insert Property";                            
  18.             var L_strEdit_DialogTitle        = "Edit Property";                                    
  19.             var L_strVisibility_DialogTitle    = "Visibility";                                                
  20.             var L_strInvalidPropertyName_ErrorMessage    = "You must enter a valid property name to continue.";                
  21.             var L_strInvalidPropertyValue_ErrorMessage    = "You must enter a valid property value to continue.";                
  22.         </script>
  23.         <script type="text/JavaScript">        
  24.         
  25.             var g_strDialogType     = "";        // set in initializeForm();
  26.                 
  27.             function onOk()
  28.             {
  29.                 if( "edit" == g_strDialogType || "insert" == g_strDialogType )
  30.                 {
  31.                     var strPropertyName        = trimStringLeft( trimStringRight( String( theForm.edPropertyName.value ) ) );
  32.                     var strPropertyValue    = trimStringLeft( trimStringRight( String( theForm.edPropertyValue.value ) ) );
  33.                 
  34.                     if( ( 0 >= strPropertyName.length ) ||
  35.                         !isValidStyleName( strPropertyName ) )
  36.                     {
  37.                         alert( L_strInvalidPropertyName_ErrorMessage );
  38.                         
  39.                         theForm.edPropertyName.focus();
  40.                         
  41.                         return;
  42.                     }
  43.                     
  44.                     if( 0 >= strPropertyValue.length )
  45.                     {
  46.                         alert( L_strInvalidPropertyValue_ErrorMessage );
  47.                         
  48.                         theForm.edPropertyValue.focus();
  49.                         
  50.                         return;
  51.                     }
  52.                 
  53.                     var astrReturn = new Array();
  54.                                             
  55.                     astrReturn[0] = String( strPropertyName );
  56.                     astrReturn[1] = String( strPropertyValue );
  57.                 }
  58.                 else if( "visibility" == g_strDialogType )
  59.                 {
  60.                     var astrReturn = new Array();
  61.                                             
  62.                     astrReturn[0] = getVisibility();
  63.                 }
  64.                 
  65.                 window.returnValue = astrReturn;
  66.                 window.close();
  67.             }
  68.  
  69.             function onCancel()
  70.             {                
  71.                 window.returnValue = null;
  72.                 window.close();
  73.             }
  74.             
  75.             function isValidStyleName( strStyleName )
  76.             {
  77.                 var regexp = /[^a-z0-9_\.]+/i;    
  78.     
  79.                 var n = strStyleName.search( regexp );
  80.                 
  81.                 if( 0 <= strStyleName.search( regexp ) )
  82.                 {        
  83.                     return false;
  84.                 }
  85.                 
  86.                 return true;
  87.             }
  88.  
  89.             function initializeForm()
  90.             {
  91.                 var aoArguments        = window.dialogArguments;            
  92.                 var strDialogType    = aoArguments[0];                            
  93.                 
  94.                 g_strDialogType = strDialogType.toLowerCase();
  95.                                 
  96.                 if( "insert" == g_strDialogType )
  97.                 {
  98.                     document.title = L_strInsert_DialogTitle;
  99.                     
  100.                     idPropertyForm.style.display = "block";
  101.                                         
  102.                     safeFocus( theForm.edPropertyName );
  103.                 }
  104.                 else if( "edit" == g_strDialogType )
  105.                 {
  106.                     document.title                    = L_strEdit_DialogTitle;
  107.                     
  108.                     idPropertyForm.style.display = "block";
  109.                                         
  110.                     theForm.edPropertyName.value    = aoArguments[1];
  111.                     theForm.edPropertyValue.value    = aoArguments[2];                                    
  112.                                                             
  113.                     safeFocus( theForm.edPropertyName );
  114.                 }            
  115.                 else if( "visibility" == g_strDialogType )
  116.                 {
  117.                     document.title                    = L_strVisibility_DialogTitle;
  118.                     
  119.                     idVisibilityForm.style.display = "block";                
  120.                     
  121.                     setVisibility( aoArguments[1] );
  122.  
  123.                     var oChecked = null;
  124.                     
  125.                     if( theForm.radInherit.checked ) safeFocus( theForm.radInherit );
  126.                     else if( theForm.radVisible.checked ) safeFocus( theForm.radVisible );
  127.                     else if( theForm.radHidden.checked ) safeFocus( theForm.radHidden );
  128.                 }    
  129.             }
  130.             
  131.             function setVisibility( strValue )
  132.             {
  133.                 theForm.radInherit.checked     = false;
  134.                 theForm.radVisible.checked     = false;
  135.                 theForm.radHidden.checked     = false;                
  136.                             
  137.                 if( "visible" == strValue.toLowerCase() ) theForm.radVisible.checked = true;
  138.                 else if( "hidden" == strValue.toLowerCase() ) theForm.radHidden.checked = true;
  139.                 else theForm.radInherit.checked = true;                    // default
  140.             }
  141.             
  142.             function getVisibility()
  143.             {
  144.                 if( theForm.radInherit.checked ) return "inherit";
  145.                 if( theForm.radVisible.checked ) return "visible";
  146.                 if( theForm.radHidden.checked ) return "hidden";            
  147.             }
  148.             
  149.         </script>
  150.     </head>
  151.     <body onload="initializeForm()">
  152.         <form id="theForm" name="theForm" onsubmit="onOk(); return false;">
  153.             <table height="100%" width="100%">
  154.                 <tr>
  155.                     <td>
  156.                         <div id="idPropertyForm" style="display: none">
  157.                             <table>
  158.                                 <tr>
  159.                                     <td nowrap>
  160.                                         <label accesskey="n" for="edPropertyName">
  161.                                             
  162.                                                         
  163.                                             Property <u>N</u>ame:
  164.                                         </label>
  165.                                     </td>
  166.                                     <td>
  167.                                          
  168.                                     </td>
  169.                                     <td width="100%">
  170.                                         <input size="55" id="edPropertyName" name="edPropertyName" type="text">
  171.                                     </td>
  172.                                 </tr>
  173.                                 <tr>
  174.                                     <td nowrap>
  175.                                         <label accesskey="v" for="edPropertyValue">
  176.                                             
  177.                                                         
  178.                                             Property <u>V</u>alue:
  179.                                         </label>
  180.                                     </td>
  181.                                     <td>
  182.                                          
  183.                                     </td>
  184.                                     <td width="100%">
  185.                                         <input size="55" id="edPropertyValue" name="edPropertyValue" type="text">
  186.                                     </td>
  187.                                 </tr>
  188.                             </table>
  189.                         </div>
  190.                         <div id="idVisibilityForm" style="display: none">
  191.                             <table width="100%">
  192.                                 <tr>
  193.                                     <td>
  194.                                         <table>
  195.                                             <tr>
  196.                                                 <td nowrap>
  197.                                                     
  198.                                                     Visibility style
  199.                                                 </td>
  200.                                                 <td>
  201.                                                      
  202.                                                 </td>
  203.                                                 <td width="100%">
  204.                                                     <hr />
  205.                                                 </td>
  206.                                             </tr>
  207.                                         </table>
  208.                                     </td>
  209.                                 </tr>
  210.                                 <tr>
  211.                                     <td>
  212.                                         <table>
  213.                                             <tr>
  214.                                                 <td>
  215.                                                      
  216.                                                 </td>
  217.                                                 <td>
  218.                                                     <input id="radInherit" tabIndex="1" type="radio" CHECKED value="inherit" name="ElementGroup">
  219.                                                 </td>
  220.                                                 <td nowrap>
  221.                                                     <label accesskey="i" for="radInherit">
  222.                                                         
  223.                                                         
  224.                                                             <u>I</u>nherit
  225.                                                     </label>
  226.                                                 </td>
  227.                                             </tr>
  228.                                             <tr>
  229.                                                 <td>
  230.                                                      
  231.                                                 </td>
  232.                                                 <td>
  233.                                                     <input id="radVisible" tabIndex="2" type="radio" CHECKED value="visible" name="ElementGroup">
  234.                                                 </td>
  235.                                                 <td nowrap>
  236.                                                     <label accesskey="v" for="radVisible">
  237.                                                         
  238.                                                         
  239.                                                             <u>V</u>isible
  240.                                                     </label>
  241.                                                 </td>
  242.                                             </tr>
  243.                                             <tr>
  244.                                                 <td>
  245.                                                      
  246.                                                 </td>
  247.                                                 <td>
  248.                                                     <input id="radHidden" tabIndex="2" type="radio" CHECKED value="hidden" name="ElementGroup">
  249.                                                 </td>
  250.                                                 <td nowrap>
  251.                                                     <label accesskey="h" for="radHidden">
  252.                                                         
  253.                                                         
  254.                                                             <u>H</u>idden
  255.                                                     </label>
  256.                                                 </td>
  257.                                             </tr>
  258.                                         </table>
  259.                                     </td>
  260.                                 </tr>
  261.                             </table>
  262.                         </div>
  263.                     </td>
  264.                 <tr>
  265.                     <td colspan="3" height="100%">
  266.                     </td>
  267.                 </tr>
  268.                 <tr>
  269.                     <td colspan="3">
  270.                         <hr>
  271.                     </td>
  272.                 </tr>
  273.                 <tr>
  274.                     <td colspan="3" width="100%">
  275.                         <table width="100%">
  276.                             <tr>
  277.                                 <td width="100%">
  278.                                      
  279.                                 </td>
  280.                                 <td>
  281.                                     <table>
  282.                                         <tr>
  283.                                             <td>
  284.                                                 <button id="btnOk" tabindex="2" type="submit">
  285.                                                 
  286.                                                     OK
  287.                                                 </button>
  288.                                             </td>
  289.                                             <td>
  290.                                                  
  291.                                             </td>
  292.                                             <td>
  293.                                                 <button id="btnCancel" onclick="onCancel()" tabindex="3">
  294.                                                                                             
  295.                                                     Cancel
  296.                                                 </button>
  297.                                             </td>
  298.                                         </tr>
  299.                                     </table>
  300.                                 </td>
  301.                             </tr>
  302.                         </table>
  303.                     </td>
  304.                 </tr>
  305.             </table>
  306.         </form>
  307.     </body>
  308. </html>
  309.